package com.t282.crm.repository;

import com.t282.crm.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface UserRepository extends JpaRepository<User,Long>, JpaSpecificationExecutor<User> {
    @Query("select u from User u where u.usrName=?1 and u.usrPassword = ?2")
    public User getByUsrNameAndUsrPassword(String usrName,String usrPassword);

    //根据用户名查询用户对象
    public User findUserByUsrName(String usrName);
}
